Strict
Import brl.filesystem

Global sourcefile:String, outputfile:String
Global filestream:TStream


Function parse_cmd()
	Local i
	For i = 0 Until AppArgs.length

		If FileType(AppArgs[i]) = FILETYPE_FILE Then
			sourcefile = AppArgs[i]
		
		Else
		
			Select AppArgs[i]
			Case "-o"
				i:+1
				outputfile = AppArgs[i]
			EndSelect
		
		EndIf

	Next
EndFunction